<?php 
    $this->headTitle('Listing tables');
    $this->headLink(array(
        'rel' => 'stylesheet',
        'media' => 'screen',
        'href' => $this->resource('css/crud.css'),
    ));
?>
<?php if (!$this->layout()->getMvcInstance() || !$this->layout()->isEnabled()) echo $this->render('_partials/head.phtml'); ?>

<?php if (!empty($this->messages)) : ?>
<div id="crud-messages">
    <p>
    <?php echo implode("</p>\n<p>", $this->messages); ?>
    </p>
</div>
<?php endif; ?>

<p>Select a database table:</p>
<ul id="db-tables">
<?php foreach ($this->tables as $table) : ?>
    <li><a href="<?php echo $this->url(array('action'=>'list', 'table'=>$table)) ?>"><?php echo $this->inflect($table)->toPhrase(Mz_Inflector::UC_FIRST) ?></a></li>
<?php endforeach ?>
<?php if (!$this->tables) : ?>
    <li>There are no tables in the database.</li>
<?php endif ?>
</ul>
<!-- View: $Id -->

<?php if (!$this->layout()->getMvcInstance() || !$this->layout()->isEnabled()) echo $this->render('_partials/foot.phtml'); ?>